@charset "UTF-8";

html, body {
  min-height: 100%;
  height: 100%;
  background-color: $dark-color;
}

body {
  font-family: "MicrosoftYaHei", "Microsoft YaHei", Helvetica, Arial;
  font-size: 14px;
  line-height: 1.5;
  color: $body-font-color;
  margin: 0;
}

* {
  -webkit-font-smoothing: antialiased;
  -webkit-box-sizing: border-box;
  -moz-box-sizing: border-box;
  box-sizing: border-box;
}

*:before,
*:after {
  -webkit-box-sizing: border-box;
  -moz-box-sizing: border-box;
  box-sizing: border-box;
}

ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

pre {
  font-family: Menlo, Monaco, "Lucida Console", monospace;
  word-wrap: break-word;
  white-space: pre-wrap;
  word-break: break-all;
  font-size: 12px;
  padding: 10px;
  margin: 0;
}


h1 {
  margin: 0 0 10px;
  font-size: 2.1em;
}

h2 {
  margin: 0 0 5px;
  font-size: 1.5em;
}

h3 {
  margin: 0 0 5px;
  font-size: 1.17em;
}

h4 {
  margin: 0 0 5px;
  font-size: 1em;
}

h6 {
  margin: 0 0 5px;
  font-size: 0.67em;
}

a {
  color: $bg-level-third;
  background-color: transparent;
  text-decoration: none;
}
a:link, a:visited, a:hover, a:active{
  text-decoration: none;
  outline: none;
}

input,
button,
select,
textarea {
  font-family: inherit;
  font-size: inherit;
  line-height: inherit;
  outline: none;
  border: 1px solid $border-color-light;
  &:focus, &:hover{
    outline: none;
  }
}
select::-ms-expand{
  display: none;
}
select{
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  -ms-appearance: none;
  padding-right: 8px;
  background-origin: content-box;
  background-image: url(./images/arrow-down.svg);
  background-repeat: no-repeat;
  background-position: right center;
}

input, select, textarea{
  @include box-shadow(inset 0 1px 1px rgba(0,0,0,0.075));
  &:focus{
    border-color: #66afe9;
    box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 8px rgba(102, 175, 233, 0.6);
    -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 8px rgba(102, 175, 233, 0.6);
  }
}

// 去除html5中number输入框右侧的上下箭头
input::-webkit-outer-spin-button,
input::-webkit-inner-spin-button{
  -webkit-appearance: none !important;
}
input[type="number"]{
  -moz-appearance:textfield;
}

input:disabled {
  cursor: not-allowed;
}

input[type="checkbox"], input[type="radio"]{
  &:focus{
    outline: none;
  }
  &+label, &+span{
    margin-left: 5px;
    vertical-align: middle;
    font-weight: initial;
    cursor: pointer;
  }
}
label {
  display: inline-block;
  margin-bottom: 5px;
}


.input {
  height:32px;
  padding: 6px 12px;
  border-radius: 3px;
  color: #555;
}

.container {
  position: relative;
  width: 100%;
  height: 100%;
  padding: 0;
  overflow: hidden;
  >div{
    height: 100%;
  }
}

.main-wrapper {
  width: 100%;
  height: 100%;
  min-height: 100%;
  overflow: hidden;
  background-color: $bg-light-first;
  zoom: 1;
  @include transition(padding-left 0.7s ease-in-out);
  &.narrow{
    padding-left: 55px;
    .header{
      left: 55px;
    }
  }
  .main{
    width: 100%;
    height: 100%;
    >div{
      height: 100%;
      >div{
        @include flex(flex, column);
        @include animation(scaleIn 0.8s ease-in-out);
        padding: 20px;
        height: 100%;
        overflow: auto;
      }
    }
  }
}

// 防止动画效果出现时，上一个页面内容仍然存在
.ng-leave, .ng-hide{
  display: none!important;
  opacity: 0;
}

@keyframes scaleIn {
  0%{ @include scale(0.97); opacity: 0.9 }
  100% { @include scale(1); opacity: 1 }
}
@keyframes slideInLeft {
  0%{ @include translate(-10px, 0); opacity: 0.9 }
  100% { @include translate(0, 0); opacity: 1 }
}
@keyframes slideInRight {
  0%{ @include translate(10px, 0); opacity: 0.9 }
  100% { @include translate(0, 0); opacity: 1 }
}
@keyframes slideInTop {
  0%{ @include translate(0, -10px); opacity: 0.9 }
  100% { @include translate(0, 0); opacity: 1 }
}
@keyframes slideInBottom {
  0%{ @include translate(0, 10px); opacity: 0.9 }
  100% { @include translate(0, 0); opacity: 1 }
}

.pt, .pt-2{
  padding: 20px;
  border-radius: 5px;
  background-color: $white-color;
  color: $light-font-color;
  @include box-shadow(0 0 6px rgba(0, 0, 0, 0.2));
}
.pt{
  margin-bottom: 30px;
}
.pt-2{
  flex: 1;
}

.toolbar, .md-toolbar{
  padding: 0;
  margin-bottom: 20px;
  color: $light-font-color;
  >.btn{
    height: 32px;
  }
  ul.statusBar{
    border-radius: 3px;
    background-color: $bg-light-first;
    display: inline-block;
    margin-right: 10px;
    padding: 1px;
    vertical-align: middle;
    height: 32px;
    li{
      float: left;
      border-radius: 3px;
      line-height: 30px;
      &.active{
        background-color: #fff;
      }
      a{
        color: $input-font-color;
        padding: 0 10px;
      }
    }
  }
  input{
    width: 240px;
    color: $input-font-color;
    vertical-align: middle;
    padding-left: 25px;
    background-image: url(./images/search_glyph.png);
    background-repeat: no-repeat;
    background-position: 3% 55%;
  }
  select{
    width: 240px;
    height: 32px;
    color: $input-font-color;
    border-radius: 4px;
    text-indent: 8px;
    vertical-align: middle;
  }
}


.no-padding{
  padding: 0;
}
.no-margin{
  margin: 0;
}
[file-select]+input[type="file"]{
  display: none;
}


// 创建、编辑页
.create-body, .edit-body{
  margin-top: 20px;
  padding: 10px 0 20px;
  border-bottom: 1px solid $border-color-light;
}
.create-footer, .edit-footer{
  margin-top: 20px;
}

.input-tips{
  font-weight: 400;
  font-style: normal;
  font-size: 12px;
  color: $input-font-color;
  margin-top: 8px;
}

.error-messages{
  font-weight: 400;
  font-style: normal;
  font-size: 12px;
  color: $unhealthy;
  margin-top: 8px;
}
.error-messages>i{
  background: url(./images/icon.svg) no-repeat 0px -359px;
  display: inline-block;
  width: 16px;
  height: 16px;
  margin-bottom: -2px;
}

.item-required:after{
  content: '*';
  color: #cc3333;
  margin-left: 4px;
}

.map-array{
  .item{
    position: relative;
    margin-bottom: 20px;
    &:last-child{
      margin: 0;
    }
    >div:first-child{
      padding-left: 0;
    }
    input{
      width: 100%;
    }
    .item-btn-group{
      position: absolute;
      right: 0;
      top: 50%;
      transform: translateY(-50%);
    }
  }
  .border-table{
    input{
      width: 100%;
    }
  }
}

// collapse
.my-panel{
  @include box-shadow(none);
  border: none;
  .panel-heading{
    border: none;
    color: $home-font-color-light;
    background-color: rgba(225, 233, 238, 0.35);
    &[data-toggle]{
      cursor: pointer;
    }
    i{
      @include transition(transform 0.3s ease-in-out);
      @include transform(rotate(90deg) translate(3px, 0));
      display: inline-block;
      width: 24px;
      height: 22px;
      margin-right: 10px;
      background: url(./images/icon.svg) no-repeat -24px -316px;
      vertical-align: middle
    }
    &.collapsed i{
      @include transform(rotate(0deg) translate(4px, 0));
    }
  }
}


.div-table{
  .div-tr{
    border-bottom: 1px solid $bg-light-first;
    padding: 8px 0;
    font-size: 12px;
    @include flex(flex, row, space-between);
    span{
      color: inherit;
      max-width: 200px;
      overflow: hidden;
      text-overflow: ellipsis;
      white-space: nowrap;
      word-break: break-all;
      &:first-child{
        color: inherit;
      }
      &.healthy{
        color: $healthy;
        i{
          display: inline-block;
          width: 16px;
          height: 16px;
          background: url(/images/icon-new.svg) no-repeat -1px -15px;
        }
      }
      &.unhealthy{
        color: $unhealthy;
        i{
          display: inline-block;
          width: 16px;
          height: 16px;
          background: url(/images/icon-new.svg) no-repeat -19px -15px;
        }
      }
    }
  }
  .div-tr.no-border{
    border: none;
  }
}

.loading-modal{
     position: fixed;
     width: 100%;
     height: 100%;
     left: 220px;
     top: 100px;
     z-index: 99;
     background: rgba(0, 0, 0, 0.3);
     overflow: hidden;
     .loading {
       position: absolute;
       top: 30%;
       border-radius:8px;
       width: 160px;
       height: 72px;
       left: 50%;
       margin-top: -36px;
       margin-left: -80px;
       text-align: center;
       img {
          margin-top: 12px;
          text-align: center;
       }
       span {
          display: block;
       }
    }
}
a {cursor: pointer !important;}

  form {
    textarea, input[type="text"], input[type="password"], input[type="datetime"], input[type="email"], input[type="url"], input[type="search"], input[type="tel"]  {
        background-color: #ffffff;
        border: 1px solid #cccccc;
        -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075);
        -moz-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075);
        box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075);
        -webkit-transition: border linear .2s, box-shadow linear .2s;
        -moz-transition: border linear .2s, box-shadow linear .2s;
        -o-transition: border linear .2s, box-shadow linear .2s;
        transition: border linear .2s, box-shadow linear .2s;
    }
    select, textarea, input[type="text"], input[type="password"], input[type="datetime"], input[type="email"], input[type="url"], input[type="search"], input[type="tel"] {
        display: inline-block;
        height:34px;
        min-width:200px;
        padding: 4px 6px;
        margin-bottom: 10px;
        font-size: 14px;
        line-height: 20px;
        color: #555555;
        -webkit-border-radius: 4px;
        -moz-border-radius: 4px;
        border-radius: 4px;
        vertical-align: middle;
    }
  }